<?php
/**
 * 门锁/网管/房间关系管理类
 *
 * @auther 大耳牛
 * 2016-12-31
 **/
namespace Home\Model;
use Think\Model;
class LockcmdModel extends Model{
	//定义表名称
	protected $tableName = 'lockcmd_log';
	
	/**
	 * 获取网管列表总数
	 *
	 **/
	public function getLockcmdLogListCount($where=array()){
		$where['visible'] = 1;
		return $this->where($where)->count();
	}
	
	/**
	 * 获取网管列表
	 *
	 **/
	public function getLockcmdLogList($page, $where=array()){
		$where['visible'] = 1;
		return $this->where($where)->order('id desc')->page($page, C('PAGE_SIZE'))->select();
	}
	
	/**
	 * 获取日志列表
	 *
	 **/
	public function getLockcmdLogListAll($where=array()){
		$where['visible'] = 1;
		return $this->where($where)->order('id desc')->select();
	}
	
	/**
	 * 保存信息
	 *
	 **/
	public function addLockcmdLog($data){
		return $this->data($data)->add();
	}
	
}